package com.boot.modules.admin.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.boot.modules.admin.dao.RedPacketMapper;
import com.boot.modules.admin.service.RedPacketService;
import com.boot.notes.rocketmq.transactionMsg.entity.RedPacket;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @className: RedPacketServiceImpl
 * @auther: mkq
 * @date: 2022/01/22 10:29
 * @desctiption: TODO
 * @version: 1.0
 */
@Service
public class RedPacketServiceImpl extends ServiceImpl<RedPacketMapper, RedPacket> implements RedPacketService {

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void sellRedPacket(RedPacket redPacket) {
        this.baseMapper.insert(redPacket);
    }

}
